<template>
	<view class="container">
		<view class="example">
			<uni-list>
				<uni-list-item title="查看作业" showArrow link="redirectTo" @click="onClickWork" />
				<uni-list-item title="查看学分" showArrow link="redirectTo" @click="onClickCreditHour" />
				<uni-list-item title="查看考勤" showArrow link="redirectTo" @click="onClickClockingIn" />
			</uni-list>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				student: null
			}
		},
		onLoad(data) {
			this.student = JSON.parse(decodeURIComponent(data.data))
		},
		methods: {
			onClickWork() {
				uni.navigateTo({
					url: '/pages/studentMyWork/index?data=' + encodeURIComponent(JSON.stringify(this.student))
				})
			},
			onClickCreditHour() {
                uni.navigateTo({
                	url: '/pages/studentCredit/index?data=' + encodeURIComponent(JSON.stringify(this.student))
                })
			},
			onClickClockingIn() {
				uni.navigateTo({
					url: '/pages/signIn/studentMySign/mySignIn?data=' + encodeURIComponent(JSON.stringify(this
						.student))
				})
			}
		}
	};
</script>

<style lang="scss">
	page {
		background-color: #ffffff;
	}

	.example {
		padding: 15px;
		background-color: #fff;
	}

	.segmented-control {
		margin-bottom: 15px;
	}

	.button-group {
		margin-top: 15px;
		display: flex;
		justify-content: space-around;
	}

	.form-item {
		display: flex;
		align-items: center;
		flex: 1;
	}

	.button {
		display: flex;
		align-items: center;
		height: 35px;
		line-height: 35px;
		margin-left: 10px;
	}


	.slot-box {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
	}

	.slot-image {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		margin-right: 10px;
		width: 30px;
		height: 30px;
	}

	.slot-text {
		flex: 1;
		font-size: 14px;
		color: #4cd964;
		margin-right: 10px;
	}
</style>